package com.shensi.appCollect.enums;

import com.shensi.appCollect.pojo.ActivityMessagePushRecord;

public enum WxTemplateEnum {
    REFUEL_SUCCESS(1,"wxTemplateRefuelSuccess"),
    POINT_CHANGE(2,"wxTemplatePointChange"),
    RECHARGE_SUCCESS(3,"wxTemplateRechargeSuccess"),
    OIL_PRICE_CHANGE(4,"wxTemplateOilPriceChange"),
    COUPON_DISTRIBUTION(5,"WxTemplateCouponDistribution"),
    CREATE_ACTIVITY(ActivityMessagePushRecord.activity_wx_mess_template_type,"WxTemplateCreateActivity"),
    REFUND_SUCCESS(7,"RefundSuccess"),
    INTEGRAL_CHANGE(8,"IntegralChange"),
    CUSTOM_MESSAGES(9,"customMessages"),
    MONTHLY_CONSUMPTION_REPORT(10,"monthlyConsumptionReport"),
    ;

    private Integer code;
    private String type;

    WxTemplateEnum(Integer code, String type) {
        this.code = code;
        this.type = type;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public static WxTemplateEnum getByCode(Integer code) {
        for (WxTemplateEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }

        }
        return  null;
    }

}
